body {
  margin: 0;
}

* {
  box-sizing: border-box;
}

/* 总体布局 */
.calculator {
  display: grid;
  grid-template-columns: repeat(4,6rem);
  grid-template-rows: minmax(6rem,auto) repeat(5,4rem);
  gap : 1px;
  background-color: rgba(191,191,191,0.75);
  width: calc(24rem + 5px);
  margin: 0 auto;
  border: 2px solid black;
}
/* 输出 独占一整行
  里面文字占满，使用flex布局
  输出框均匀布满一整列
*/
.output {
  
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-around;
  padding: 10px;
  word-wrap: break-word;
  word-break: break-all;
}
/* 输出结果 */
.last-output {

}

.current-output {
  font-size: 3rem;
}

/* ac独占2格 */
.button-ac {
  grid-column: 1 / span 2;
}

/* 等号独占两格 */
.button-equal {
  grid-column: 3 / span 2;
}
.calculator > button {
  background-color: rgba(250,250,249,0.75);
}

/* 高亮效果 */
.calculator > button:hover {
  background-color: #B5B5B5;
}